//
//  NSMutableDictionary+Extension.m
//  米小礼商户版
//
//  Created by Li Tian on 2022/1/11.
//

#import "NSMutableDictionary+Extension.h"

@implementation NSMutableDictionary (Extension)

- (void)safe_setObject:(id)anObject forKey:(id<NSCopying>)aKey {
    if (anObject == nil) {
        return;
    }
    if (aKey == nil) {
        return;
    }
    [self setObject:anObject forKey:aKey];
}

- (void)safe_emptyObject:(id)anObject forKey:(id<NSCopying>)aKey {
    if (aKey == nil) {
        return;
    }
    if (anObject == nil) {
        [self setObject:@"" forKey:aKey];
        return;
    }
    [self setObject:anObject forKey:aKey];
}

@end
